using Circus.CodeEditor;
using System;
using System.ComponentModel;
namespace Circus.Syntax.CodeCompletion
{
	public class ParameterMember : IParameterMember, IComparable
	{
		private string qualifier = string.Empty;
		private string name = string.Empty;
		private string description = string.Empty;
		private string dataType = string.Empty;
		private string text = string.Empty;
		private ParameterModifer modifiers = ParameterModifer.None;
		public virtual string Name
		{
			get
			{
				return this.name;
			}
			set
			{
				if (this.name != value)
				{
					this.name = value;
					this.OnNameChanged();
				}
			}
		}
		public virtual string DataType
		{
			get
			{
				return this.dataType;
			}
			set
			{
				if (this.dataType != value)
				{
					this.dataType = value;
					this.OnDataTypeChanged();
				}
			}
		}
		public virtual string Description
		{
			get
			{
				return this.description;
			}
			set
			{
				if (this.description != value)
				{
					this.description = value;
					this.OnDescriptionChanged();
				}
			}
		}
		public virtual string Qualifier
		{
			get
			{
				return this.qualifier;
			}
			set
			{
				if (this.qualifier != value)
				{
					this.qualifier = value;
					this.OnQualifierChanged();
				}
			}
		}
		public virtual ParameterModifer Modifiers
		{
			get
			{
				return this.modifiers;
			}
			set
			{
				if (this.modifiers != value)
				{
					this.modifiers = value;
					this.OnModifiersChanged();
				}
			}
		}
		public virtual string Text
		{
			get
			{
				return this.text;
			}
			set
			{
				if (this.text != value)
				{
					this.text = value;
					this.OnTextChanged();
				}
			}
		}
		[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
	
		protected virtual void OnNameChanged()
		{
		}
		protected virtual void OnDataTypeChanged()
		{
		}
		protected virtual void OnDescriptionChanged()
		{
		}
		protected virtual void OnQualifierChanged()
		{
		}
		protected virtual void OnTextChanged()
		{
		}
		protected virtual void OnModifiersChanged()
		{
		}
		public virtual int CompareTo(object value)
		{
			if (value is IParameterMember)
			{
				return string.Compare(this.name, ((IParameterMember)value).Name, true);
			}
			throw new ArgumentException();
		}
	}
}
